function saveDEMPar(origin_x, origin_y, scale_x, scale_y, size_x, size_y, dem_par_path)

    [~, out_basename, ~] = fileparts(dem_par_path);
    fid = fopen(dem_par_path, "w");
    fprintf(fid, "Gamma DIFF&GEO DEM/MAP parameter file\n");
    fprintf(fid, "title: %s\n", out_basename);
    fprintf(fid, "DEM_projection:     EQA\n");
    fprintf(fid, "data_format:        REAL*4\n");
    fprintf(fid, "DEM_hgt_offset:          0.00000\n");
    fprintf(fid, "DEM_scale:               1.00000\n");
    fprintf(fid, "width:                %d\n", size_x);
    fprintf(fid, "nlines:               %d\n", size_y);
    fprintf(fid, "corner_lat:     %.9f  decimal degrees\n", origin_y);
    fprintf(fid, "corner_lon:     %.9f  decimal degrees\n", origin_x);
    fprintf(fid, "post_lat: %.9e  decimal degrees\n", scale_y);
    fprintf(fid, "post_lon: %.9e  decimal degrees\n", scale_x);
    fprintf(fid, "\n");
    fprintf(fid, "ellipsoid_name: WGS 84\n");
    fprintf(fid, "ellipsoid_ra:        6378137.000   m\n");
    fprintf(fid, "ellipsoid_reciprocal_flattening:  298.2572236\n");
    fprintf(fid, "\n");
    fprintf(fid, "datum_name: WGS 84\n");
    fprintf(fid, "datum_shift_dx:              0.000   m\n");
    fprintf(fid, "datum_shift_dy:              0.000   m\n");
    fprintf(fid, "datum_shift_dz:              0.000   m\n");
    fprintf(fid, "datum_scale_m:         0.00000e+00\n");
    fprintf(fid, "datum_rotation_alpha:  0.00000e+00   arc-sec\n");
    fprintf(fid, "datum_rotation_beta:   0.00000e+00   arc-sec\n");
    fprintf(fid, "datum_rotation_gamma:  0.00000e+00   arc-sec\n");
    fprintf(fid, "datum_country_list: WGS 84\n");
    fprintf(fid, "\n");
    fclose(fid);

end
